package com.java.base.exercise;

import cn.hutool.core.codec.Base64Encoder;
import cn.hutool.core.io.FileUtil;
import org.springframework.util.Base64Utils;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Base64;

/**
 * @Author RenPu
 * @Date 2023/2/6 10:23
 * @Version 1.0
 * @Description:
 **/
public class PhotoChangeBase64 {

    public static void main(String[] args) {
//        byte[] data = null;
//        try {
//            File file = new File("C:\\Users\\12795\\Desktop\\LS000636-17839229913.jpg");
//            InputStream in = new FileInputStream(file);
////        in = url.openStream();//远程文件
//            data = new byte[in.available()];
//            in.read(data);
//            in.close();
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        Base64.Encoder encoder = Base64.getEncoder();
//        System.out.println(encoder.encodeToString(data));


    }





}
